package ms.platform.progress.dao;

import java.util.List;
import java.util.Map;

import ms.platform.progress.dto.ModelPlanDto;
import ms.platform.progress.dto.ProcessDto;
import ms.platform.progress.dto.ProgressAccountDto;
import ms.platform.progress.dto.ProgressRecordVo;

/**
 * 进度查询DAO
 * @author Kevin Deng
 *
 */
public interface ProgressViewDao {
	
	/**
	 * 条件查询进度台帐
	 * @param dto
	 * @return
	 */
	public List<ProgressRecordVo> findProcessRecordByConditions(Map<String, Object> map);
	/**
	 * 条件查询台账明细
	 * @param dto
	 * @return
	 */
	public List<ProgressAccountDto> queryProgessAccount(Map<String, Object> map);
	
	/**
	 * 大屏展示
	 * @param dto
	 * @return
	 */
	public List<ProgressRecordVo> showLargeScreen(Map<String, Object> map);
	
	public Integer showLargeScreenCount(Map<String, Object> map);
	/**
	 * 查询已完成工序
	 */
	public List<ProcessDto> queryCompleteProcess(Integer modelPlanId);
	/**
	 * 统计已完成工序延期或者提前天数
	 * @param map
	 * @return
	 */
	public Integer sumDelayOrAdvanceDay(Map<String, Object> map);
	
	public List<ModelPlanDto> queryAllModelPlan(Map<String, Object> map);
	public Integer queryAllModelPlanCount(Map<String, Object> map);
	
	public List<ProgressRecordVo> queryProgessRecord(Map<String, Object> map);
	/**
	 * 检查是否有提交台账
	 * @param map
	 * @return
	 */
	public ProgressRecordVo queryIsSubmitRecord(Map<String, Object> map);
	/**
	 * 查询已完成工序提前/延期天数 
	 * @param map
	 * @return
	 */
	public ProgressRecordVo queryModelPlanDaysAndStatus(Map<String, Object> map);
	/**
	 * 获取最新提交进度工序
	 * @param id
	 * @return
	 */
	public String queryModelProcessNameByPlanId(Integer id);
	/**
	 * 查询已完成工序
	 * @param map
	 * @return
	 */
	public List<ProcessDto> queryCompleteProcessName(Map<String, Object> map);
}
